'''
LastEditors: 杜康
LastEditTime: 2021-09-27 18:35:47
'''
from urllib.request import urlopen
from bs4 import BeautifulSoup

import re


def getLinks(pageUrl):
    # global pages
    html = urlopen('https://www.jd.com/?country=USA')
    bs = BeautifulSoup(html, 'html.parser')
    for link in bs.find_all('a', {'class': 'cate_detail_con_lk'}):
        print(link.attrs['href'])


getLinks('')